import request from '@/request/request.js'

// 获取优惠券列表
export const myCouponCard = (params) => {
	return request({
		url: "/api/wanlshop/coupon/getList",
		method: "get",
		data: params,
	})
}

// 领取优惠券
export const myCouponReceive = (params) => {
	return request({
		url: "/api/wanlshop/coupon/receive",
		method: "post",
		data: params,
	})
}

// 获取我的卡券列表
export const myCouponList = (params) => {
	return request({
		url: "/api/wanlshop/coupon/getMyList",
		method: "post",
		data: params,
	})
}

// 微信登录
export const weixinLogin = (params) => {
	return request({
		url: "/api/wanlshop/user/third",
		method: "post",
		data: params,
	})
}

// 完善用户资料
export const myProInfo = (params) => {
	return request({
		url: "/api/wanlshop/user/perfect",
		method: "post",
		data: params,
	})
}

// 修改用户资料
export const myUpdateInfo = (params) => {
	return request({
		url: "/api/wanlshop/user/profile",
		method: "post",
		data: params,
	})
}

// 更新用户信息
export const myRefreshInfo = (params) => {
	return request({
		url: "/api/wanlshop/user/refresh",
		method: "post",
		data: params,
	})
}

// 获取手机号
export const myPhone = (params) => {
	return request({
		url: "/api/user/getWxPhone",
		method: "post",
		data: params,
	})
}

// 获取会员等级列表
export const myMemberCard = (params) => {
	return request({
		url: "/api/user/memberCard",
		method: "post",
		data: params,
	})
}

// 购买会员
export const myMemberPay = (params) => {
	return request({
		url: "/api/qsy/order/addMemberOrder",
		method: "post",
		data: params,
	})
}

// 发送短信
export const mySendSms = (params) => {
	return request({
		url: "/api/wanlshop/sms/send",
		method: "post",
		data: params,
	})
}

// 绑定手机号
export const myBindPhone = (params) => {
	return request({
		url: "/api/wanlshop/user/mobilelogin",
		method: "post",
		data: params,
	})
}

// 获取收货地址列表
export const myAddressList = (params) => {
	return request({
		url: "/api/wanlshop/address/getaddress",
		method: "post",
		data: params,
	})
}

// 获取所有城市信息
export const myCityList = (params) => {
	return request({
		url: "/api/wanlshop/common/area",
		method: "post",
		data: params,
	})
}

// 新增/编辑收货地址
export const myEditAddress = (params) => {
	return request({
		url: "/api/wanlshop/address/address",
		method: "post",
		data: params,
	})
}

// 删除收货地址
export const myDelAddress = (params) => {
	return request({
		url: "/api/wanlshop/address/deladdress",
		method: "post",
		data: params,
	})
}

// 获取订单列表
export const myOrderList = (params) => {
	return request({
		url: "/api/wanlshop/order/getOrderList",
		method: "post",
		data: params,
	})
}

// 获取物流信息
export const myLogistics = (params) => {
	return request({
		url: "/api/wanlshop/order/getLogistics",
		method: "post",
		data: params,
	})
}

// 获取活动订单详情
export const myActivityOrderDetail = (id) => {
	return request({
		url: "/api/qsy/order/getOrderInfo?id=" + id,
		method: "get",
	})
}

// 获取商品订单详情
export const myGoodsOrderDetail = (id) => {
	return request({
		url: "/api/wanlshop/order/getOrderInfo?id=" + id,
		method: "post",
		data: {},
	})
}

// 取消订单
export const myCancelOrder = (params) => {
	return request({
		url: "/api/wanlshop/order/cancelOrder",
		method: "post",
		data: params,
	})
}

// 确认收货
export const myConfirmOrder = (params) => {
	return request({
		url: "/api/wanlshop/order/confirmOrder",
		method: "post",
		data: params,
	})
}

// 评论订单
export const myCommentOrder = (params) => {
	return request({
		url: "/api/wanlshop/order/commentOrder",
		method: "post",
		data: params,
	})
}

// 删除订单
export const myDelOrder = (params) => {
	return request({
		url: "/api/wanlshop/order/delOrder",
		method: "post",
		data: params,
	})
}

// 申请退款
export const myApplyRefund = (params) => {
	return request({
		url: "/api/wanlshop/refund/addApply",
		method: "post",
		data: params,
	})
}

// 修改申请退款
export const myEditRefund = (params) => {
	return request({
		url: "/api/wanlshop/refund/editRefund",
		method: "post",
		data: params,
	})
}

// 获取退货详情
export const myRefundDetail = (id) => {
	return request({
		url: "/api/wanlshop/refund/getRefundInfo?id=" + id,
		method: "get",
	})
}

// 退货历史
export const myRefundLog = (id) => {
	return request({
		url: "/api/wanlshop/refund/getRefundLog?id=" + id,
		method: "get",
	})
}

// 提交快递单号
export const myRefundExpress = (params) => {
	return request({
		url: "/api/wanlshop/refund/toExpress",
		method: "post",
		data: params
	})
}

// 退款平台介入
export const myRefundArbitration = (params) => {
	return request({
		url: "/api/wanlshop/refund/arbitrationRefund",
		method: "post",
		data: params
	})
}

// 关闭退款
export const myRefundCencel = (params) => {
	return request({
		url: "/api/wanlshop/refund/closeRefund",
		method: "post",
		data: params
	})
}

// 客服服务
export const myService = (params) => {
	return request({
		url: "/api/qsy/qsy/customerService",
		method: "post",
		data: params,
	})
}

// 虚拟币充值记录
export const myCoinRecharge = (params) => {
	return request({
		url: "/api/qsy/order/rechargeList",
		method: "post",
		data: params,
	})
}

// 虚拟币使用记录/退款记录
export const myCoinUse = (params) => {
	return request({
		url: "/api/qsy/order/moneyRefundUseList",
		method: "post",
		data: params,
	})
}

// 虚拟币充值
export const myCoinPay = (params) => {
	return request({
		url: "/api/wanlshop/pay/recharge",
		method: "post",
		data: params,
	})
}